<?php
include "ViewBase.php";

if (!isset($_POST["Id"]) || $_POST["Id"] == 0)
{
    $entidade = SalvarGenerico("Responsavel", $_POST, null, false);
    ?>
    <script>
        location.href = "ResponsavelPainel.php?Id=<?php echo $entidade->Id; ?>";
    </script>
    <?php
} else
{
    SalvarGenerico("Responsavel", $_POST, "ResponsavelPainel.php?Id=" . $_POST["Id"]);
}
?>
